From 2b668a84e52a8999d93c438fb259ddf0ec0f62fe Mon Sep 17 00:00:00 2001 From: Wei Liu Date: Thu, 5 Oct 2017 10:35:28 +0100 Subject: [PATCH] libxl: use correct type modifier for vuart_gfn MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fixes compilation error like: libxl_console.c: In function ‘libxl__device_vuart_add’: libxl_console.c:379:5: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘xen_pfn_t’ [-Werror=format=] flexarray_append(ro_front, GCSPRINTF("%lu", state->vuart_gfn)); Reported-by: Konrad Rzeszutek Wilk Signed-off-by: Wei Liu Tested-by: Bhupinder Thakur --- tools/libxl/libxl_console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libxl/libxl_console.c b/tools/libxl/libxl_console.c index 13ecf128e2..c05dc28b99 100644 --- a/tools/libxl/libxl_console.c +++ b/tools/libxl/libxl_console.c @@ -376,7 +376,7 @@ int libxl__device_vuart_add(libxl__gc *gc, uint32_t domid, flexarray_append(ro_front, "port"); flexarray_append(ro_front, GCSPRINTF("%"PRIu32, state->vuart_port)); flexarray_append(ro_front, "ring-ref"); - flexarray_append(ro_front, GCSPRINTF("%lu", state->vuart_gfn)); + flexarray_append(ro_front, GCSPRINTF("%"PRI_xen_pfn, state->vuart_gfn)); flexarray_append(ro_front, "limit"); flexarray_append(ro_front, GCSPRINTF("%d", LIBXL_XENCONSOLE_LIMIT)); flexarray_append(ro_front, "type"); -- 2.30.2